package cn.edu.jmu.oelp.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.listener.Topic;

/**
 * 目前没用
 */
@Configuration
public class RabbitConfig {
    private String qName;

    @Bean
    public TopicExchange getTopicExchange(){
        return new TopicExchange("topic-exchange",true,false);
    }

    @Bean
    public Queue getQueue(){
        return new Queue("boot-queue",true,false,false,null);
    }

    @Bean
    public Binding getBinding(TopicExchange topicExchange,Queue queue){
        return BindingBuilder.bind(queue).to(topicExchange).with("*.Paragraphs");
    }


}
